if __name__ == '__main__':
    for i in range(5000, 10000):
        t = set(list(str(i) + str(i * 2)))
        if len(t) == 9 and '0' not in t:
            print(i, str(i) + str(i * 2))
